
package demo.issuetracker.controller;

import demo.issuetracker.model.CustomIdentity;
import demo.issuetracker.entity.User;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.In;


import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIData;
import javax.faces.event.ActionEvent;
import java.util.Map;
import java.util.List;

/**
 * Glue code to bind Change Password Service with the view framework (Seam). This class contains
 * a default implementation of the action methods. Please avoid reimplmenting the action methods in this class.
 * The purpose of this class is to declare properties which can be bound to the UI.
 * 
  * This page lets the user change his password. Login required.
  *
 * Automatically generated by clickframes
 * 
 * @author Vineet Manohar
 */
public abstract class GeneratedChangePasswordController extends Controller {

    public User getLoggedInUser() {
        return identity.getUser();
    }

 
    
	@SuppressWarnings("unused")
	private static final Log logger = LogFactory.getLog(GeneratedChangePasswordController.class);

	@In
	protected CustomIdentity identity;

    @Create
    public void init() {


        // initialize all file inputs
 

        // initialize all file inputs
          // all inputs initialized here 
    }




	/**
	 * This method should be called before the page is loaded
	 * 
	 * All the page parameters should be consumed in this method
	 */    
    public String processPageParameters() {


          // if you need to add more code, override this method in the child class

        return null;
    }





	/** Current Password
	 *
 	 * Current Password
 	 */
   
	protected String changePasswordFormCurrentPassword;

  	@org.hibernate.validator.NotNull(message="Please enter your current password.")
  	public String getChangePasswordFormCurrentPassword() {
	   return this.changePasswordFormCurrentPassword;
	}

	public void setChangePasswordFormCurrentPassword(String changePasswordFormCurrentPassword) {
		this.changePasswordFormCurrentPassword = changePasswordFormCurrentPassword;
	}
	/** New Password
	 *
 	 * New Password
 	 */
   
	protected String changePasswordFormNewPassword;

  	@org.hibernate.validator.NotNull(message="Please enter a new password.")
     	@org.hibernate.validator.Length( min=6,  message="New password must be at least 6 characters.")
 	public String getChangePasswordFormNewPassword() {
	   return this.changePasswordFormNewPassword;
	}

	public void setChangePasswordFormNewPassword(String changePasswordFormNewPassword) {
		this.changePasswordFormNewPassword = changePasswordFormNewPassword;
	}
	/** Repeat New Password
	 *
 	 * Repeat New Password
 	 */
   
	protected String changePasswordFormRepeatNewPassword;

  	@org.hibernate.validator.NotNull(message="Please repeat your new password.")
     	@org.hibernate.validator.Length( min=6,  message="New password must be at least 6 characters.")
 	public String getChangePasswordFormRepeatNewPassword() {
	   return this.changePasswordFormRepeatNewPassword;
	}

	public void setChangePasswordFormRepeatNewPassword(String changePasswordFormRepeatNewPassword) {
		this.changePasswordFormRepeatNewPassword = changePasswordFormRepeatNewPassword;
	}



 
       public void changePasswordFormCurrentPasswordValidator(javax.faces.context.FacesContext facesContext,
            javax.faces.component.UIComponent component, java.lang.Object value) {
        String valueStr = value.toString();
        
    }
     public void changePasswordFormNewPasswordValidator(javax.faces.context.FacesContext facesContext,
            javax.faces.component.UIComponent component, java.lang.Object value) {
        String valueStr = value.toString();
        
    }
     public void changePasswordFormRepeatNewPasswordValidator(javax.faces.context.FacesContext facesContext,
            javax.faces.component.UIComponent component, java.lang.Object value) {
        String valueStr = value.toString();
        
    }

 

 

 
   /**
    * Change Password
    *
    *     * Automatically generated by clickframes
    */
   public abstract ChangePasswordFormChangePasswordOutcome changePasswordFormChangePassword();




    private static final long serialVersionUID = 1L;

     /**
     * different legal outcomes for Change Password 
     * 
     * This page lets the user change his password. Login required.
     */
     public enum ChangePasswordFormChangePasswordOutcome {
        /** 
         * Password changed successfully
         */ 
        passwordChanged,    
        /** 
         * Current password is incorrect
         */ 
        wrongOldPassword,    
        /** 
         * New passwords do not match
         */ 
        passwordsDontMatch    
    }
  }// clickframes::version=2406163178::clickframes